package com.cf.base.comm.tools;

import android.content.Context;
import android.util.TypedValue;

import androidx.annotation.AttrRes;

/**
 * 颜色工具类 从主题中获取颜色
 *
 * @author yangji
 */
public class ThemeUtils {

    public static int getThemeColor(Context context, @AttrRes int attrRes) {
        TypedValue typedValue = new TypedValue();
        context.getTheme().resolveAttribute(attrRes, typedValue, true);
        return typedValue.data;
    }




    
}
